<!DOCTYPE html>
<html>
  <head>
    <title>New Window!</title>
  </head>
  <body>
    <h1>New Window!</h1>
    We are using node.js
    <script>
      var gui = require('nw.gui');
      var win = gui.Window.get();
      win.on('focus', function() {
        gui.App.closeAllWindows();
      });

    </script>
  </body>
</html>
